package com.flute.haflute.monitor;

import java.io.Serializable;
import java.util.List;

import com.flute.haflute.agent.topo.Node;
import com.flute.haflute.jobbox.base.StatusReporter.JOB_STATUS;

public class JobMonitorInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	public String jobid;
	public Node master;
	public JOB_STATUS jobstatus;
	public List<String> childs;
	public String jobDescription;
	public String receiveDate;  //JOB创建的时间 本地
	public String finishedDate;  //结束时间
	public StatusMessage statusMessage;
	
	public JobMonitorInfo(String master){
		this.setMaster(new Node(master));
	}
	
	public String getJobid() {
		return jobid;
	}
	public void setJobid(String jobid) {
		this.jobid = jobid;
	}
	public Node getMaster() {
		return master;
	}
	public void setMaster(Node master) {
		this.master = master;
	}
	public JOB_STATUS getJobstatus() {
		return jobstatus;
	}
	public void setJobstatus(JOB_STATUS jobstatus) {
		this.jobstatus = jobstatus;
	}
	public List<String> getChilds() {
		return childs;
	}
	public void setChilds(List<String> childs) {
		this.childs = childs;
	}
	 
	

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final JobMonitorInfo other = (JobMonitorInfo) obj;
		if (jobid == null) { 
			if (other.jobid != null)
				return false;
		} else if (!jobid.equals(other.jobid))
			return false;
		return true;
	}

	public String getJobDescription() {
		return jobDescription;
	}

	public void setJobDescription(String jobDescription) {
		this.jobDescription = jobDescription;
	}

	
	public String getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(String receiveDate) {
		this.receiveDate = receiveDate;
	}

	public String getFinishedDate() {
		return finishedDate;
	}

	public void setFinishedDate(String finishedDate) {
		this.finishedDate = finishedDate;
	}

	public StatusMessage getStatusMessage() {
		return statusMessage;
	}

	public void setStatusMessage(StatusMessage statusMessage) {
		this.statusMessage = statusMessage;
	}

	

}
